Data

_________________________________________________
                                              choose
 *265*

Input types: boolean; <any>; <any>

Output types: <any>

Description: 
Choice is TrueChoice if Criterion is TRUE, and FalseChoice otherwise.

See also:  switch

_________________________________________________
 
                     copy 
 *265*

Input types: <any>

Output types: <any>

Description: 
ItemCopy is a copy of Item. This is a “deep” copy:  see the“Prograph Data Types” section of appendix II, “C Code Usage”, for a discussion of data types and memory management.

 Use of the copy primitve is the prescribed method of copy System Class instances if you want to store them using the save, or to-bytes primitives or any of the datfile primitives.  The copy primitive clears all active? flags of these instances.

_________________________________________________
                                           switch
 *265*

Input names: K; Default; Data1; [Data2; … ; DataN]

Input types: integer; <any>; <any>; [<any>; … ; <any>]

Output names: Result

Output types: <any>

Description: 
If K is between 1 and N inclusive, Result is the Kth element of (Data1... DataN); otherwise Result is Default.

See also:  choose.i).primitive(s):categories:Data;

_________________________________________________
                                              shallow-copy
*266*

Input type: 
any

Output type: any

Description: 
Copies the given Item into ItemCopy. If Item is a complex object (instance or list), the referenced objects (both complex and simple) in the attributes or list slots are not copied, but their use counts are incremented.

See also:
copy